﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management;

namespace WINADM.Server.WMI
{
    public class WMIUtility
    {
        public static DateTime? ConvertDmtfToDateTime(object dmtfDate)
        {
            if (dmtfDate != null)
                return ManagementDateTimeConverter.ToDateTime(dmtfDate.ToString());
            else
                return null;
        }

        public static string ConvertDateTimeToDmtf(DateTime dateTime)
        {
                return ManagementDateTimeConverter.ToDmtfDateTime(dateTime);
        }
    }
}
